<template>
	<div class="app">
		
	
	<ul class="mui-table-view">
		
				<li class="mui-table-view-cell mui-media" v-for="(item,index) in list" :key="index" >
					<router-link :to='"/new/"+item.id'>
						<img class="mui-media-object mui-pull-left" :src="item.img_url">
						<div class="mui-media-body">
							{{item.title}}
							<p class='mui-ellipsis'>
								发表时间：{{item.add_time | time("YYYY-MM-DD")}}
								<span>点击：{{item.click}}</span>
							</p>
						</div>
					</router-link>
				</li>
				

			</ul>
			
	</div>		
</template>

<script>
import commit from "../../kits/commit.js"
	export default {

  data () {
    return {
    	 msg: '新闻列表',
			list:[]
    }
   },
   created(){
   	this.getList()
   },
   methods:{
   	getList(){
   		var url = commit.api+"/api/getnewslist";
   		this.$http.get(url).then(res=>{
   			this.list = res.body.message;
   			
   		},res=>{
   			console.log(res.body);
   		})
   			
   	}
   }
}
	
</script>

<style scoped>
	.mui-ellipsis {
		color: #26a2ff;
		position: absolute;
		bottom: 8px;
		width: 77%;
	}
	.mui-ellipsis span{
		position: absolute;
		right: 15px;
	}
	.mui-table-view-cell{
		padding: 11px 10px;
	}
	.mui-table-view .mui-media-object{
		max-width: 60px;
		height: 60px;
		line-height: 60px;
	}
	.mui-table-view-cell > a:not(.mui-btn){
		white-space: normal;
	}
	
	
</style>